package cn.gz.demo.adapter;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.recyclerview.widget.RecyclerView;

import java.util.List;

import cn.gz.demo.R;

/**
 * Created by Liuyz on 2017/11/13.
 */
public class WorkListAdapter extends RecyclerView.Adapter<WorkListAdapter.MyViewHolder> {
    private Activity context;
    private List<String> list;

    public WorkListAdapter(Activity activity, List<String> response) {
        this.context = activity;
        this.list = response;
    }

    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.work_wait_list_item, parent, false);
        return new MyViewHolder(view);
    }

    @Override
    public void onBindViewHolder(MyViewHolder holder, int position) {
    }

    @Override
    public int getItemCount() {
        return list == null ? 0 : list.size();
    }

    public class MyViewHolder extends RecyclerView.ViewHolder {

        public MyViewHolder(View view) {
            super(view);
        }
    }
}
